//
//  TipFoto.m
//  iDent
//
//  Created by Marius Corega on 7/17/09.
//  Copyright 2009 Marius Corega. All rights reserved.
//

#import "TipFoto.h"


@implementation TipFoto

- (id)initWithXMLData: (NSData*) data
{
	self = [super initWithXMLData:data tableName:@"tipurifoto" elementName:@"tip"];
	
	
	return self;
}

-(id)initWithServerURL:(NSURL*) url
{
	NSMutableDictionary* dict = [NSMutableDictionary dictionary];
	[dict setObject:@"tip_foto" forKey:@"tabel"];
	notification = @"TipFotoLoaded";
	
	self = [super initWithServerURL:url postDict:dict];
	
	return self;
}


- (NSArray*)tipuriFoto
{
	return _elemente;
}

- (NSArray*)tipuriStrings
{
	
	NSMutableArray *tipStrings = [[NSMutableArray alloc] init];
	
	for (int i=0; i<[_elemente count] ; i++) {
		
		NSString *str = [[_elemente objectAtIndex:i] objectForKey:@"descriere"];
		[tipStrings addObject:str];
	}
	return tipStrings;
}


@end
